﻿namespace Dyao.Book.Web.Extensions
{
    public class ExtensionDataContractResolverOptions
    {
        public bool UseCamelCasing { get; set; } = true;

        public bool ProcessDictionaryKeys { get; set; } = true;

        /// <summary>
        /// bool类型序列化时是否添加描述,默认为true
        /// </summary>
        public bool IsAddBoolDescription { get; set; } = true;

        /// <summary>
        /// bool类型添加的描述名称格式化字符串
        /// </summary>
        public string BoolDescriptionNameFormat { get; set; }

        /// <summary>
        /// enum 类型序列化时是否添加描述,默认为true
        /// </summary>
        public bool IsAddEnumDescription { get; set; } = true;

        /// <summary>
        /// enum 类型添加的描述名称格式化字符串
        /// </summary>
        public string EnumDescriptionNameFormat { get; set; }

        /// <summary>
        /// string 类型序列化遇到null时是否转成空字符串,默认为false
        /// </summary>
        public bool IsConvertNullStringToEmpty { get; set; } = false;

        /// <summary>
        /// 数组或List 序列化时遇到null 是否转成空实例,默认为false
        /// </summary>
        public bool IsConvetNullListToEmpty { get; set; } = false;
    }
}
